package cn.anecansaitin.industrialization_expansion.client.integration.jei;

import cn.anecansaitin.industrialization_expansion.ModConstant;
import cn.anecansaitin.industrialization_expansion.common.item.crafting.ModifiedToolRecipe;
import mezz.jei.api.IModPlugin;
import mezz.jei.api.JeiPlugin;
import mezz.jei.api.registration.IVanillaCategoryExtensionRegistration;
import net.minecraft.util.ResourceLocation;

import javax.annotation.Nonnull;

@JeiPlugin
public class JEIIndustrializationExpansionPlugin implements IModPlugin {
    private final ResourceLocation id = new ResourceLocation(ModConstant.MOD_ID, "jei_plugin");

    @Override
    public @Nonnull ResourceLocation getPluginUid() {
        return id;
    }

    @Override
    public void registerVanillaCategoryExtensions(IVanillaCategoryExtensionRegistration registration) {
        registration.getCraftingCategory().addCategoryExtension(ModifiedToolRecipe.class, r -> true, ModCraftingCategoryExtension::new);
    }
}
